package com.questionnaire.entity;

import java.util.ArrayList;
import java.util.List;

public class QuestionExample {
    protected String orderByClause;

    protected boolean distinct;

    protected List<Criteria> oredCriteria;

    public QuestionExample() {
        oredCriteria = new ArrayList<Criteria>();
    }

    public void setOrderByClause(String orderByClause) {
        this.orderByClause = orderByClause;
    }

    public String getOrderByClause() {
        return orderByClause;
    }

    public void setDistinct(boolean distinct) {
        this.distinct = distinct;
    }

    public boolean isDistinct() {
        return distinct;
    }

    public List<Criteria> getOredCriteria() {
        return oredCriteria;
    }

    public void or(Criteria criteria) {
        oredCriteria.add(criteria);
    }

    public Criteria or() {
        Criteria criteria = createCriteriaInternal();
        oredCriteria.add(criteria);
        return criteria;
    }

    public Criteria createCriteria() {
        Criteria criteria = createCriteriaInternal();
        if (oredCriteria.size() == 0) {
            oredCriteria.add(criteria);
        }
        return criteria;
    }

    protected Criteria createCriteriaInternal() {
        Criteria criteria = new Criteria();
        return criteria;
    }

    public void clear() {
        oredCriteria.clear();
        orderByClause = null;
        distinct = false;
    }

    protected abstract static class GeneratedCriteria {
        protected List<Criterion> criteria;

        protected GeneratedCriteria() {
            super();
            criteria = new ArrayList<Criterion>();
        }

        public boolean isValid() {
            return criteria.size() > 0;
        }

        public List<Criterion> getAllCriteria() {
            return criteria;
        }

        public List<Criterion> getCriteria() {
            return criteria;
        }

        protected void addCriterion(String condition) {
            if (condition == null) {
                throw new RuntimeException("Value for condition cannot be null");
            }
            criteria.add(new Criterion(condition));
        }

        protected void addCriterion(String condition, Object value, String property) {
            if (value == null) {
                throw new RuntimeException("Value for " + property + " cannot be null");
            }
            criteria.add(new Criterion(condition, value));
        }

        protected void addCriterion(String condition, Object value1, Object value2, String property) {
            if (value1 == null || value2 == null) {
                throw new RuntimeException("Between values for " + property + " cannot be null");
            }
            criteria.add(new Criterion(condition, value1, value2));
        }

        public Criteria andQidIsNull() {
            addCriterion("qid is null");
            return (Criteria) this;
        }

        public Criteria andQidIsNotNull() {
            addCriterion("qid is not null");
            return (Criteria) this;
        }

        public Criteria andQidEqualTo(Integer value) {
            addCriterion("qid =", value, "qid");
            return (Criteria) this;
        }

        public Criteria andQidNotEqualTo(Integer value) {
            addCriterion("qid <>", value, "qid");
            return (Criteria) this;
        }

        public Criteria andQidGreaterThan(Integer value) {
            addCriterion("qid >", value, "qid");
            return (Criteria) this;
        }

        public Criteria andQidGreaterThanOrEqualTo(Integer value) {
            addCriterion("qid >=", value, "qid");
            return (Criteria) this;
        }

        public Criteria andQidLessThan(Integer value) {
            addCriterion("qid <", value, "qid");
            return (Criteria) this;
        }

        public Criteria andQidLessThanOrEqualTo(Integer value) {
            addCriterion("qid <=", value, "qid");
            return (Criteria) this;
        }

        public Criteria andQidIn(List<Integer> values) {
            addCriterion("qid in", values, "qid");
            return (Criteria) this;
        }

        public Criteria andQidNotIn(List<Integer> values) {
            addCriterion("qid not in", values, "qid");
            return (Criteria) this;
        }

        public Criteria andQidBetween(Integer value1, Integer value2) {
            addCriterion("qid between", value1, value2, "qid");
            return (Criteria) this;
        }

        public Criteria andQidNotBetween(Integer value1, Integer value2) {
            addCriterion("qid not between", value1, value2, "qid");
            return (Criteria) this;
        }

        public Criteria andOwnerquestionnaireidIsNull() {
            addCriterion("ownerQuestionnaireId is null");
            return (Criteria) this;
        }

        public Criteria andOwnerquestionnaireidIsNotNull() {
            addCriterion("ownerQuestionnaireId is not null");
            return (Criteria) this;
        }

        public Criteria andOwnerquestionnaireidEqualTo(Integer value) {
            addCriterion("ownerQuestionnaireId =", value, "ownerquestionnaireid");
            return (Criteria) this;
        }

        public Criteria andOwnerquestionnaireidNotEqualTo(Integer value) {
            addCriterion("ownerQuestionnaireId <>", value, "ownerquestionnaireid");
            return (Criteria) this;
        }

        public Criteria andOwnerquestionnaireidGreaterThan(Integer value) {
            addCriterion("ownerQuestionnaireId >", value, "ownerquestionnaireid");
            return (Criteria) this;
        }

        public Criteria andOwnerquestionnaireidGreaterThanOrEqualTo(Integer value) {
            addCriterion("ownerQuestionnaireId >=", value, "ownerquestionnaireid");
            return (Criteria) this;
        }

        public Criteria andOwnerquestionnaireidLessThan(Integer value) {
            addCriterion("ownerQuestionnaireId <", value, "ownerquestionnaireid");
            return (Criteria) this;
        }

        public Criteria andOwnerquestionnaireidLessThanOrEqualTo(Integer value) {
            addCriterion("ownerQuestionnaireId <=", value, "ownerquestionnaireid");
            return (Criteria) this;
        }

        public Criteria andOwnerquestionnaireidIn(List<Integer> values) {
            addCriterion("ownerQuestionnaireId in", values, "ownerquestionnaireid");
            return (Criteria) this;
        }

        public Criteria andOwnerquestionnaireidNotIn(List<Integer> values) {
            addCriterion("ownerQuestionnaireId not in", values, "ownerquestionnaireid");
            return (Criteria) this;
        }

        public Criteria andOwnerquestionnaireidBetween(Integer value1, Integer value2) {
            addCriterion("ownerQuestionnaireId between", value1, value2, "ownerquestionnaireid");
            return (Criteria) this;
        }

        public Criteria andOwnerquestionnaireidNotBetween(Integer value1, Integer value2) {
            addCriterion("ownerQuestionnaireId not between", value1, value2, "ownerquestionnaireid");
            return (Criteria) this;
        }

        public Criteria andQuestioncodeIsNull() {
            addCriterion("questionCode is null");
            return (Criteria) this;
        }

        public Criteria andQuestioncodeIsNotNull() {
            addCriterion("questionCode is not null");
            return (Criteria) this;
        }

        public Criteria andQuestioncodeEqualTo(Integer value) {
            addCriterion("questionCode =", value, "questioncode");
            return (Criteria) this;
        }

        public Criteria andQuestioncodeNotEqualTo(Integer value) {
            addCriterion("questionCode <>", value, "questioncode");
            return (Criteria) this;
        }

        public Criteria andQuestioncodeGreaterThan(Integer value) {
            addCriterion("questionCode >", value, "questioncode");
            return (Criteria) this;
        }

        public Criteria andQuestioncodeGreaterThanOrEqualTo(Integer value) {
            addCriterion("questionCode >=", value, "questioncode");
            return (Criteria) this;
        }

        public Criteria andQuestioncodeLessThan(Integer value) {
            addCriterion("questionCode <", value, "questioncode");
            return (Criteria) this;
        }

        public Criteria andQuestioncodeLessThanOrEqualTo(Integer value) {
            addCriterion("questionCode <=", value, "questioncode");
            return (Criteria) this;
        }

        public Criteria andQuestioncodeIn(List<Integer> values) {
            addCriterion("questionCode in", values, "questioncode");
            return (Criteria) this;
        }

        public Criteria andQuestioncodeNotIn(List<Integer> values) {
            addCriterion("questionCode not in", values, "questioncode");
            return (Criteria) this;
        }

        public Criteria andQuestioncodeBetween(Integer value1, Integer value2) {
            addCriterion("questionCode between", value1, value2, "questioncode");
            return (Criteria) this;
        }

        public Criteria andQuestioncodeNotBetween(Integer value1, Integer value2) {
            addCriterion("questionCode not between", value1, value2, "questioncode");
            return (Criteria) this;
        }

        public Criteria andQuestionheadingIsNull() {
            addCriterion("questionHeading is null");
            return (Criteria) this;
        }

        public Criteria andQuestionheadingIsNotNull() {
            addCriterion("questionHeading is not null");
            return (Criteria) this;
        }

        public Criteria andQuestionheadingEqualTo(String value) {
            addCriterion("questionHeading =", value, "questionheading");
            return (Criteria) this;
        }

        public Criteria andQuestionheadingNotEqualTo(String value) {
            addCriterion("questionHeading <>", value, "questionheading");
            return (Criteria) this;
        }

        public Criteria andQuestionheadingGreaterThan(String value) {
            addCriterion("questionHeading >", value, "questionheading");
            return (Criteria) this;
        }

        public Criteria andQuestionheadingGreaterThanOrEqualTo(String value) {
            addCriterion("questionHeading >=", value, "questionheading");
            return (Criteria) this;
        }

        public Criteria andQuestionheadingLessThan(String value) {
            addCriterion("questionHeading <", value, "questionheading");
            return (Criteria) this;
        }

        public Criteria andQuestionheadingLessThanOrEqualTo(String value) {
            addCriterion("questionHeading <=", value, "questionheading");
            return (Criteria) this;
        }

        public Criteria andQuestionheadingLike(String value) {
            addCriterion("questionHeading like", value, "questionheading");
            return (Criteria) this;
        }

        public Criteria andQuestionheadingNotLike(String value) {
            addCriterion("questionHeading not like", value, "questionheading");
            return (Criteria) this;
        }

        public Criteria andQuestionheadingIn(List<String> values) {
            addCriterion("questionHeading in", values, "questionheading");
            return (Criteria) this;
        }

        public Criteria andQuestionheadingNotIn(List<String> values) {
            addCriterion("questionHeading not in", values, "questionheading");
            return (Criteria) this;
        }

        public Criteria andQuestionheadingBetween(String value1, String value2) {
            addCriterion("questionHeading between", value1, value2, "questionheading");
            return (Criteria) this;
        }

        public Criteria andQuestionheadingNotBetween(String value1, String value2) {
            addCriterion("questionHeading not between", value1, value2, "questionheading");
            return (Criteria) this;
        }

        public Criteria andQuestiontypeIsNull() {
            addCriterion("questionType is null");
            return (Criteria) this;
        }

        public Criteria andQuestiontypeIsNotNull() {
            addCriterion("questionType is not null");
            return (Criteria) this;
        }

        public Criteria andQuestiontypeEqualTo(String value) {
            addCriterion("questionType =", value, "questiontype");
            return (Criteria) this;
        }

        public Criteria andQuestiontypeNotEqualTo(String value) {
            addCriterion("questionType <>", value, "questiontype");
            return (Criteria) this;
        }

        public Criteria andQuestiontypeGreaterThan(String value) {
            addCriterion("questionType >", value, "questiontype");
            return (Criteria) this;
        }

        public Criteria andQuestiontypeGreaterThanOrEqualTo(String value) {
            addCriterion("questionType >=", value, "questiontype");
            return (Criteria) this;
        }

        public Criteria andQuestiontypeLessThan(String value) {
            addCriterion("questionType <", value, "questiontype");
            return (Criteria) this;
        }

        public Criteria andQuestiontypeLessThanOrEqualTo(String value) {
            addCriterion("questionType <=", value, "questiontype");
            return (Criteria) this;
        }

        public Criteria andQuestiontypeLike(String value) {
            addCriterion("questionType like", value, "questiontype");
            return (Criteria) this;
        }

        public Criteria andQuestiontypeNotLike(String value) {
            addCriterion("questionType not like", value, "questiontype");
            return (Criteria) this;
        }

        public Criteria andQuestiontypeIn(List<String> values) {
            addCriterion("questionType in", values, "questiontype");
            return (Criteria) this;
        }

        public Criteria andQuestiontypeNotIn(List<String> values) {
            addCriterion("questionType not in", values, "questiontype");
            return (Criteria) this;
        }

        public Criteria andQuestiontypeBetween(String value1, String value2) {
            addCriterion("questionType between", value1, value2, "questiontype");
            return (Criteria) this;
        }

        public Criteria andQuestiontypeNotBetween(String value1, String value2) {
            addCriterion("questionType not between", value1, value2, "questiontype");
            return (Criteria) this;
        }

        public Criteria andOptionaIsNull() {
            addCriterion("optionA is null");
            return (Criteria) this;
        }

        public Criteria andOptionaIsNotNull() {
            addCriterion("optionA is not null");
            return (Criteria) this;
        }

        public Criteria andOptionaEqualTo(String value) {
            addCriterion("optionA =", value, "optiona");
            return (Criteria) this;
        }

        public Criteria andOptionaNotEqualTo(String value) {
            addCriterion("optionA <>", value, "optiona");
            return (Criteria) this;
        }

        public Criteria andOptionaGreaterThan(String value) {
            addCriterion("optionA >", value, "optiona");
            return (Criteria) this;
        }

        public Criteria andOptionaGreaterThanOrEqualTo(String value) {
            addCriterion("optionA >=", value, "optiona");
            return (Criteria) this;
        }

        public Criteria andOptionaLessThan(String value) {
            addCriterion("optionA <", value, "optiona");
            return (Criteria) this;
        }

        public Criteria andOptionaLessThanOrEqualTo(String value) {
            addCriterion("optionA <=", value, "optiona");
            return (Criteria) this;
        }

        public Criteria andOptionaLike(String value) {
            addCriterion("optionA like", value, "optiona");
            return (Criteria) this;
        }

        public Criteria andOptionaNotLike(String value) {
            addCriterion("optionA not like", value, "optiona");
            return (Criteria) this;
        }

        public Criteria andOptionaIn(List<String> values) {
            addCriterion("optionA in", values, "optiona");
            return (Criteria) this;
        }

        public Criteria andOptionaNotIn(List<String> values) {
            addCriterion("optionA not in", values, "optiona");
            return (Criteria) this;
        }

        public Criteria andOptionaBetween(String value1, String value2) {
            addCriterion("optionA between", value1, value2, "optiona");
            return (Criteria) this;
        }

        public Criteria andOptionaNotBetween(String value1, String value2) {
            addCriterion("optionA not between", value1, value2, "optiona");
            return (Criteria) this;
        }

        public Criteria andOptionbIsNull() {
            addCriterion("optionB is null");
            return (Criteria) this;
        }

        public Criteria andOptionbIsNotNull() {
            addCriterion("optionB is not null");
            return (Criteria) this;
        }

        public Criteria andOptionbEqualTo(String value) {
            addCriterion("optionB =", value, "optionb");
            return (Criteria) this;
        }

        public Criteria andOptionbNotEqualTo(String value) {
            addCriterion("optionB <>", value, "optionb");
            return (Criteria) this;
        }

        public Criteria andOptionbGreaterThan(String value) {
            addCriterion("optionB >", value, "optionb");
            return (Criteria) this;
        }

        public Criteria andOptionbGreaterThanOrEqualTo(String value) {
            addCriterion("optionB >=", value, "optionb");
            return (Criteria) this;
        }

        public Criteria andOptionbLessThan(String value) {
            addCriterion("optionB <", value, "optionb");
            return (Criteria) this;
        }

        public Criteria andOptionbLessThanOrEqualTo(String value) {
            addCriterion("optionB <=", value, "optionb");
            return (Criteria) this;
        }

        public Criteria andOptionbLike(String value) {
            addCriterion("optionB like", value, "optionb");
            return (Criteria) this;
        }

        public Criteria andOptionbNotLike(String value) {
            addCriterion("optionB not like", value, "optionb");
            return (Criteria) this;
        }

        public Criteria andOptionbIn(List<String> values) {
            addCriterion("optionB in", values, "optionb");
            return (Criteria) this;
        }

        public Criteria andOptionbNotIn(List<String> values) {
            addCriterion("optionB not in", values, "optionb");
            return (Criteria) this;
        }

        public Criteria andOptionbBetween(String value1, String value2) {
            addCriterion("optionB between", value1, value2, "optionb");
            return (Criteria) this;
        }

        public Criteria andOptionbNotBetween(String value1, String value2) {
            addCriterion("optionB not between", value1, value2, "optionb");
            return (Criteria) this;
        }

        public Criteria andOptioncIsNull() {
            addCriterion("optionC is null");
            return (Criteria) this;
        }

        public Criteria andOptioncIsNotNull() {
            addCriterion("optionC is not null");
            return (Criteria) this;
        }

        public Criteria andOptioncEqualTo(String value) {
            addCriterion("optionC =", value, "optionc");
            return (Criteria) this;
        }

        public Criteria andOptioncNotEqualTo(String value) {
            addCriterion("optionC <>", value, "optionc");
            return (Criteria) this;
        }

        public Criteria andOptioncGreaterThan(String value) {
            addCriterion("optionC >", value, "optionc");
            return (Criteria) this;
        }

        public Criteria andOptioncGreaterThanOrEqualTo(String value) {
            addCriterion("optionC >=", value, "optionc");
            return (Criteria) this;
        }

        public Criteria andOptioncLessThan(String value) {
            addCriterion("optionC <", value, "optionc");
            return (Criteria) this;
        }

        public Criteria andOptioncLessThanOrEqualTo(String value) {
            addCriterion("optionC <=", value, "optionc");
            return (Criteria) this;
        }

        public Criteria andOptioncLike(String value) {
            addCriterion("optionC like", value, "optionc");
            return (Criteria) this;
        }

        public Criteria andOptioncNotLike(String value) {
            addCriterion("optionC not like", value, "optionc");
            return (Criteria) this;
        }

        public Criteria andOptioncIn(List<String> values) {
            addCriterion("optionC in", values, "optionc");
            return (Criteria) this;
        }

        public Criteria andOptioncNotIn(List<String> values) {
            addCriterion("optionC not in", values, "optionc");
            return (Criteria) this;
        }

        public Criteria andOptioncBetween(String value1, String value2) {
            addCriterion("optionC between", value1, value2, "optionc");
            return (Criteria) this;
        }

        public Criteria andOptioncNotBetween(String value1, String value2) {
            addCriterion("optionC not between", value1, value2, "optionc");
            return (Criteria) this;
        }

        public Criteria andOptiondIsNull() {
            addCriterion("optionD is null");
            return (Criteria) this;
        }

        public Criteria andOptiondIsNotNull() {
            addCriterion("optionD is not null");
            return (Criteria) this;
        }

        public Criteria andOptiondEqualTo(String value) {
            addCriterion("optionD =", value, "optiond");
            return (Criteria) this;
        }

        public Criteria andOptiondNotEqualTo(String value) {
            addCriterion("optionD <>", value, "optiond");
            return (Criteria) this;
        }

        public Criteria andOptiondGreaterThan(String value) {
            addCriterion("optionD >", value, "optiond");
            return (Criteria) this;
        }

        public Criteria andOptiondGreaterThanOrEqualTo(String value) {
            addCriterion("optionD >=", value, "optiond");
            return (Criteria) this;
        }

        public Criteria andOptiondLessThan(String value) {
            addCriterion("optionD <", value, "optiond");
            return (Criteria) this;
        }

        public Criteria andOptiondLessThanOrEqualTo(String value) {
            addCriterion("optionD <=", value, "optiond");
            return (Criteria) this;
        }

        public Criteria andOptiondLike(String value) {
            addCriterion("optionD like", value, "optiond");
            return (Criteria) this;
        }

        public Criteria andOptiondNotLike(String value) {
            addCriterion("optionD not like", value, "optiond");
            return (Criteria) this;
        }

        public Criteria andOptiondIn(List<String> values) {
            addCriterion("optionD in", values, "optiond");
            return (Criteria) this;
        }

        public Criteria andOptiondNotIn(List<String> values) {
            addCriterion("optionD not in", values, "optiond");
            return (Criteria) this;
        }

        public Criteria andOptiondBetween(String value1, String value2) {
            addCriterion("optionD between", value1, value2, "optiond");
            return (Criteria) this;
        }

        public Criteria andOptiondNotBetween(String value1, String value2) {
            addCriterion("optionD not between", value1, value2, "optiond");
            return (Criteria) this;
        }
    }

    public static class Criteria extends GeneratedCriteria {

        protected Criteria() {
            super();
        }
    }

    public static class Criterion {
        private String condition;

        private Object value;

        private Object secondValue;

        private boolean noValue;

        private boolean singleValue;

        private boolean betweenValue;

        private boolean listValue;

        private String typeHandler;

        public String getCondition() {
            return condition;
        }

        public Object getValue() {
            return value;
        }

        public Object getSecondValue() {
            return secondValue;
        }

        public boolean isNoValue() {
            return noValue;
        }

        public boolean isSingleValue() {
            return singleValue;
        }

        public boolean isBetweenValue() {
            return betweenValue;
        }

        public boolean isListValue() {
            return listValue;
        }

        public String getTypeHandler() {
            return typeHandler;
        }

        protected Criterion(String condition) {
            super();
            this.condition = condition;
            this.typeHandler = null;
            this.noValue = true;
        }

        protected Criterion(String condition, Object value, String typeHandler) {
            super();
            this.condition = condition;
            this.value = value;
            this.typeHandler = typeHandler;
            if (value instanceof List<?>) {
                this.listValue = true;
            } else {
                this.singleValue = true;
            }
        }

        protected Criterion(String condition, Object value) {
            this(condition, value, null);
        }

        protected Criterion(String condition, Object value, Object secondValue, String typeHandler) {
            super();
            this.condition = condition;
            this.value = value;
            this.secondValue = secondValue;
            this.typeHandler = typeHandler;
            this.betweenValue = true;
        }

        protected Criterion(String condition, Object value, Object secondValue) {
            this(condition, value, secondValue, null);
        }
    }
}